<body>
    <!-- [@fadeIn] -->
    <!-- <button id="login" type="submit" >***欢迎使用互助网***</button> -->

    <div id="wrapper" class="login-page">
        <div id="login_form" class="form">
            <div class="avtar">
                <img src="{{logoRUL}}" />
            </div>
            <form #form="ngForm" (ngSubmit)="form.form.valid" novalidate role="form" class="login-form">

                <!-- 用户密码登录 -->
                <div class="form-group" [ngClass]="{ 'has-error': form.submitted && !userCode.valid }">
                    <input autocomplete="off" class="form-control" type="text" id="user_name" onfocus="this.select();" value="" placeholder="账号（手机号）"
                        [(ngModel)]="user.userCode" name="userCode"  #userCode="ngModel"
                        userCode="CN" minlength='11' maxlength="11" onkeyup="value=value.replace(/[^0-9]/g,'')" />
                        <p id="userCode" [hidden]="userCode.valid||userCode.pristine">请输入完整的手机号码</p>
                    </div>
                <div class="form-group" [ngClass]="{ 'has-error': form.submitted && !password.valid }">
                    <input autocomplete="off" class="form-control" type="password" id="password" onfocus="this.value = '';" value="password"
                        placeholder="密码" [(ngModel)]="user.password" name="password" #password="ngModel" />

                </div>

                <button id="login" type="submit" (click)="doLogin(userCode.value,password.value)">登　录</button>
                <a style="text-align:left" (click)="doReset()">忘记密码？</a>
                <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
                <a style="text-align:right" (click)="doSign()">立即注册</a>
                <!-- <button id="login" type="submit" (click)="doLogin()">进入互助网</button> -->
            </form>
        </div>
    </div>

    <div>
        <!-- 提示框，隐藏IP地址 -->
        <p-dialog header="提示" [(visible)]="display" modal="modal" width="400" [responsive]="true">
            <p style="text-align:center">
                {{DiaMessage}}
            </p>

            <p-footer>
                <button type="button" pButton icon="fa-check" (click)=closeDialog() label="确定"></button>
            </p-footer>
        </p-dialog>

        <!--删除提示框-->
        <p-confirmDialog header="提示" icon="fa fa-question-circle" width="425"></p-confirmDialog>
    </div>
</body>